package com.xrui.hbase.schema.desc;


public class ColumnDesc {
    private String family;
    private String qualifier;
    private CellSchemaDesc cellSchema;

    public String getFamily() {
        return family;
    }

    public void setFamily(String family) {
        this.family = family;
    }

    public String getQualifier() {
        return qualifier;
    }

    public void setQualifier(String qualifier) {
        this.qualifier = qualifier;
    }

    public CellSchemaDesc getCellSchema() {
        return cellSchema;
    }

    public void setCellSchema(CellSchemaDesc cellSchema) {
        this.cellSchema = cellSchema;
    }

    public static class ColumnBuilder {
        private String mFamily;
        private String mQualifier;
        private CellSchemaDesc mCellSchema;

        public static ColumnBuilder newBuilder() {
            return new ColumnBuilder();
        }

        public ColumnBuilder withFamily(String family) {
            mFamily = family;
            return this;
        }

        public ColumnBuilder withQualifier(String qualifier) {
            mQualifier = qualifier;
            return this;
        }

        public ColumnBuilder withCellSchema(CellSchemaDesc cellSchema) {
            mCellSchema = cellSchema;
            return this;
        }

        public ColumnDesc build() {
            ColumnDesc columnDesc = new ColumnDesc();
            columnDesc.family = mFamily;
            columnDesc.qualifier = mQualifier;
            columnDesc.cellSchema = mCellSchema;
            return columnDesc;
        }
    }
}
